.settings {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}

/* 工具栏样式 */
.settings .toolbar {
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.settings .toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings .page-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.settings .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 内容区域 */
.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* 设置分组 */
.settings-section {
  background-color: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.settings-section:last-child {
  margin-bottom: 0;
}

.section-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #333;
}

.section-header p {
  font-size: 14px;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* 设置项 */
.settings-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.setting-item:not(:last-child) {
  border-bottom: 1px solid #f8f8f8;
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-info label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.setting-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.setting-value {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* 表单控件 */
.setting-item select {
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.setting-item select:focus {
  border-color: #007AFF;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.setting-item .btn {
  min-width: 100px;
  padding: 8px 16px;
  font-size: 14px;
}

/* 开关控件 */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: #007AFF;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* 范围输入控件 */
.range-input {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

.range-input input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

.range-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #007AFF;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.range-input input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #007AFF;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.range-value {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  min-width: 60px;
  text-align: right;
}

/* 加载状态 */
.settings.loading {
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

.settings.loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #007AFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.settings.loading p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .settings .toolbar {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
    min-height: auto;
  }
  
  .settings .toolbar-left,
  .settings .toolbar-right {
    width: 100%;
    justify-content: center;
  }
  
  .settings-content {
    padding: 16px;
    max-width: none;
  }
  
  .settings-section {
    padding: 16px;
  }
  
  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .setting-info {
    width: 100%;
  }
  
  .setting-item select,
  .setting-item .btn {
    width: 100%;
    min-width: auto;
  }
  
  .switch {
    align-self: flex-end;
  }
  
  .range-input {
    width: 100%;
    min-width: auto;
  }
  
  .range-value {
    min-width: 50px;
  }
}

@media (max-width: 480px) {
  .settings .toolbar-right {
    flex-direction: column;
    gap: 8px;
  }
  
  .settings .toolbar-right .btn {
    width: 100%;
  }
  
  .section-header h2 {
    font-size: 18px;
  }
  
  .setting-info label {
    font-size: 15px;
  }
  
  .setting-description {
    font-size: 13px;
  }
}

/* 动画 */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 滚动条样式 */
.settings-content::-webkit-scrollbar {
  width: 8px;
}

.settings-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.settings-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.settings-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}